#include "test.tab.h"
#include "lex.yy.h"
#include <stdio.h>

#ifdef YYDEBUG
  yydebug = 1;
#endif

int main(int argc,char ** argv){
    if(argc > 1) {
        if(!(yyin = fopen(argv[1], "r"))) {
            perror(argv[1]);
            return (1);
        }
    }
    printf("--------------------\n");
    yyparse();
    printf("--------------------\n");

    if(yyin) fclose(yyin);
}
yyerror(char *s){
    fprintf(stderr,"error:%s\n",s);
}